package link.hwx.service.oa.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import link.hwx.entity.oa.OaBillInfoVo;
import link.hwx.mapper.oa.OaPayReqInfoMapper;
import link.hwx.mapper.oa.OaPurchaseOrderMapper;
import link.hwx.service.oa.OaPayReqInfoService;
import link.hwx.service.oa.OaPurchaseOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@DS("OAData")
@Service
public class OaPurchaseOrderServiceImpl implements OaPurchaseOrderService {

    @Autowired
    private OaPurchaseOrderMapper oaPurchaseOrderMapper;

    @Override
    public OaBillInfoVo findPurchaseOrderByRequestId(String purchaseOrderMainTableName, String requestid) {
        return oaPurchaseOrderMapper.findPurchaseOrderByRequestId(purchaseOrderMainTableName, requestid);
    }

    @Override
    public int updatePurchaseOrderSrmDocNoByRequestId(String purchaseOrderMainTableName, String requestid, String srmdocno) {
        return oaPurchaseOrderMapper.updatePurchaseOrderSrmDocNoByRequestId(purchaseOrderMainTableName, requestid, srmdocno);
    }

    @Override
    public List<OaBillInfoVo> findPurchaseOrderByDocnoType(String purchaseOrderMainTableName, String srmdocno, String nodeType) {
        return oaPurchaseOrderMapper.findPurchaseOrderByDocnoType(purchaseOrderMainTableName, srmdocno, nodeType);
    }
}
